import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
    state: {
        weaponCurrentpage: 1,
        armorCurrentPage: 1,
        weaponList: [],
        activeName: 'a'
    },
    mutations: {
        changeWeaponCurrentpage(state, currentPage) {
            state.weaponCurrentpage = currentPage
        },
        changeArmorCurrentPage(state, currentPage) {
            state.armorCurrentPage = currentPage
        },
        changeWeaponList(state, weaponList) {
            state.weaponList = weaponList
        },
        changeActiveName(state, activeName) {
            state.activeName = activeName
        },
    },
    getters: {
        weaponCurrentpage: state => {
            return state.weaponCurrentpage
        }
    },
    actions: {

    },
    modules: {

    }
})

export default store